#!/bin/bash

if [[ ! "$(rustfmt --version)" =~ "0.9.0" ]]; then
    echo "Rustfmt version 0.9.0 needed"
    exit 1
fi

cargo fmt -- --write-mode=diff
